package org.jeecg.modules.car.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.car.entity.CarFeeRule;
import org.jeecg.modules.car.mapper.CarFeeRuleMapper;
import org.jeecg.modules.car.service.ICarFeeRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 月卡收费规则
 * @Author: jeecg-boot
 * @Date:   2020-09-01
 * @Version: V1.0
 */
@Service
public class CarFeeRuleServiceImpl extends ServiceImpl<CarFeeRuleMapper, CarFeeRule> implements ICarFeeRuleService {

    @Autowired
    private CarFeeRuleMapper carFeeRuleMapper;

    @Override
    public List<CarFeeRule> findPage(Page<CarFeeRule> page, CarFeeRule carFeeRule) {
        return carFeeRuleMapper.findPage(page,carFeeRule);
    }

    @Override
    public int existName(String parkId, String name,String id) {
        return carFeeRuleMapper.existName(parkId,name,id);
    }

    @Override
    public List<CarFeeRule> findByParkId(String parkId) {
        return carFeeRuleMapper.findByParkId(parkId);
    }

    @Override
    public CarFeeRule getByModelAndType(String carModel, String carType) {
        return carFeeRuleMapper.getByModelAndType(carModel,carType);
    }

    @Override
    public CarFeeRule getByParkRuleName(String parkId, String feeRuleName) {
        return carFeeRuleMapper.getByParkRuleName(parkId,feeRuleName);
    }

}
